<%@ include file="../views/taglib.jsp" %>

<script type="text/javascript">
	$(document).ready(function(){
		$(".btn-notify").click(function(e){
			$.notify("Change status success", "success");
		});

		$("#table_new").dataTable();

		$("#table_active").dataTable();

		$("#table_disable").dataTable();
	});
</script>

<h2 class="text-info text-center">User New</h2>
<table class="table table-striped table-bordered table-hover" id="table_new">
	 <thead>
		 <tr>
		 	<th>Login Id</th>
		 	<th>Password</th>
		 	<th>ID Card Number</th>
		 	<th>First Name</th>
		 	<th>Last Name</th>
		 	<th>Phone 1</th>
		 	<th>Address 1</th>
		 	<th>Email 1</th>
		 	<th>Change</th>
		 <tr>
	 </thead>
	 <tbody>
	 	<c:forEach items="${userNew}" var="user">
	 		<tr>
	 			<td>${user.loginId}</td>
	 			<td>${user.password.substring(0,5)}</td>
	 			<td>${user.cardnumberid}</td>
	 			<td>${user.firstname}</td>
	 			<td>${user.lastname}</td>
	 			<td>${user.phone1}</td>
	 			<td>${user.address1}</td>
	 			<td>${user.email1}</td>
	 			<td><a href="<c:url value="/changestatus/active/${user.loginId}"/>" class="btn btn-success btn-notify"><span class="glyphicon glyphicon-ok-sign"></span> Active</a></td>
	 		</tr>
	 	</c:forEach>
	 </tbody>
</table>

<h2 class="text-info text-center">User Active</h2>
<table class="table table-striped table-bordered table-hover" id="table_active">
	  <thead>
		 <tr>
		 	<th>Login Id</th>
		 	<th>Password</th>
		 	<th>ID Card Number</th>
		 	<th>First Name</th>
		 	<th>Last Name</th>
		 	<th>Phone 1</th>
		 	<th>Address 1</th>
		 	<th>Email 1</th>
		 	<th>Change</th>
		 <tr>
	 </thead>
	 <tbody>
	 	<c:forEach items="${userActive}" var="user">
	 		<tr>
	 			<td>${user.loginId}</td>
	 			<td>${user.password.substring(0,5)}</td>
	 			<td>${user.cardnumberid}</td>
	 			<td>${user.firstname}</td>
	 			<td>${user.lastname}</td>
	 			<td>${user.phone1}</td>
	 			<td>${user.address1}</td>
	 			<td>${user.email1}</td>
	 			<td><a href="<c:url value="/changestatus/disable/${user.loginId}"/>" class="btn btn-danger btn-notify"><span class="glyphicon glyphicon-remove-sign"></span> Disable</a></td>
	 		</tr>
	 	</c:forEach>
	 </tbody>
</table>

<h2 class="text-info text-center">User Disable</h2>
<table class="table table-striped table-bordered table-hover" id="table_disable">
	  <thead>
		 <tr>
		 	<th>Login Id</th>
		 	<th>Password</th>
		 	<th>ID Card Number</th>
		 	<th>First Name</th>
		 	<th>Last Name</th>
		 	<th>Phone 1</th>
		 	<th>Address 1</th>
		 	<th>Email 1</th>
		 	<th>Change</th>
		 <tr>
	 </thead>
	 <tbody>
	 	<c:forEach items="${userDisable}" var="user">
	 		<tr>
	 			<td>${user.loginId}</td>
	 			<td>${user.password.substring(0,5)}</td>
	 			<td>${user.cardnumberid}</td>
	 			<td>${user.firstname}</td>
	 			<td>${user.lastname}</td>
	 			<td>${user.phone1}</td>
	 			<td>${user.address1}</td>
	 			<td>${user.email1}</td>
	 			<td><a href="<c:url value="/changestatus/active/${user.loginId}"/>" class="btn btn-success btn-notify"><span class="glyphicon glyphicon-ok-sign"></span> Active</a></td>
	 		</tr>
	 	</c:forEach>
	 </tbody>
</table>